package com.kjtpay.design_pattern.observer;

abstract class Observer {
    protected String name;
    protected String action = "没有观察到主题变化，该干嘛干嘛";

    public Observer(String name) {
        this.name = name;
    }

    // 收到主题消息后的响应
    public abstract void update(String subjectState);

    // 展示响应信息
    public String showAction() {
        return action;
    }
}
